﻿Imports DTO
Imports System.Data.OleDb

Public Class BaoCaoTonDAO
    Public Shared Sub Insert(ByVal bc As BaoCaoTonDTO)
        Dim sql As String = "insert into BAOCAOTON(MaSach,NgayPhatSinh,TonDau,PhatSinh,TonCuoi) values(" & bc.MaSach & ",'" & bc.NgayPhatSinh & "'," & bc.TonDau & ",'" & bc.PhatSinh & "'," & bc.TonCuoi & ")"
        DatabassProvider.ExcuNonQuery(sql)
    End Sub

    Public Shared Function BaoCaoThang(ByVal thang As Integer) As DataTable
        Dim sql As String = "select * from BAOCAOTON where Month(NgayPhatSinh) like '%" & thang & "%' "
        Return DatabassProvider.ExcuQuery(sql)
    End Function
End Class
